]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/network: Set default name for toggle title
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 4 Feb 2023 18:00:28 +0000 (15:00 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 4 Feb 2023 21:09:44 +0000 (18:09 -0300)
Following the previous commits where we left the quick toggle title
open for the new title scheme, set the titles for all network pills
to what currently is the "default" name.

That means, we pull the device name from Network Manager for devices,
through the disambiguate function, and hardcode 'VPN' for VPN
connections.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2619>

js/ui/status/network.js

index 7057241a1b9acd6d93e1a9e4eea9ced9c532da0c..781e298a46a2e10fb56e2b0ee9641f4197d4cf6d 100644 (file)
@@ -1318,6 +1318,10 @@ const NMToggle = GObject.registerClass({
         this._itemBinding = new GObject.BindingGroup();
         this._itemBinding.bind('icon-name',
             this, 'icon-name', GObject.BindingFlags.DEFAULT);
+        this._itemBinding.bind_property_full('source',
+            this, 'title', GObject.BindingFlags.DEFAULT,
+            () => [true, this._getDefaultName()],
+            null);
         this._itemBinding.bind_full('name',
             this, 'subtitle', GObject.BindingFlags.DEFAULT,
             (bind, source) => [true, this._transformSubtitle(source)],